<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head>
	<th:block th:include="include :: header" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-elevatorInstall-edit" th:object="${elevatorInstall}">
            <input id="installId" name="installId" th:field="*{installId}"  type="hidden">
			<input id="installPlace" name="installPlace" th:field="*{installPlace}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">电梯名称：</label>
				<div class="col-sm-8">
					<input id="elevatorName" name="elevatorName" th:field="*{elevatorName}" class="form-control" type="text" readonly>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">地区：</label>
				<div class="col-xs-3">
					<select class="form-control" id="province" name="province" onchange="doProvAndCityRelation();">
						<option id="choosePro" value="-1">请选择省份</option>
					</select>
				</div>
				<div class="col-xs-3">
					<select class="form-control" id="city" name="city" onchange="doCityAndCountyRelation();">
						<option id='chooseCity' value='-1'>请选择城市</option>
					</select>
				</div>
				<div class="col-xs-3">
					<select class="form-control" id="county" name="county">
						<option id='chooseCounty' value='-1'>请选择区/县</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">详细地址：</label>
				<div class="col-sm-8">
					<input id="detailAddress" name="detailAddress" th:field="*{detailAddress}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">电梯品牌：</label>
				<div class="col-sm-8">
					<input id="elevatorBrand" name="elevatorBrand" th:field="*{elevatorBrand}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">电梯型号：</label>
				<div class="col-sm-8">
					<input id="elevatorModel" name="elevatorModel" th:field="*{elevatorModel}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">电梯厂商：</label>
				<div class="col-sm-8">
					<input id="elevatorBusiness" name="elevatorBusiness" th:field="*{elevatorBusiness}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">安装人：</label>
				<div class="col-sm-8">
					<input id="createBy" name="createBy" th:field="*{createBy}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea id="remark" name="remark" th:field="*{remark}" row="5" class="form-control" type="text"></textarea>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
	<th:block th:include="include :: area-js"/>
    <script type="text/javascript">
		var prefix = ctx + "business/elevatorInstall";
		$("#form-elevatorInstall-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		function submitHandler() {
	        if ($.validate.form()) {
				var province = $.form.selectSelects("province").substr(6);
				var city = $.form.selectSelects("city").substr(6);
				var county = $.form.selectSelects("county").substr(6);
				var installPlace = $("input[name='installPlace']").val(province+city+county+"");
	            $.operate.save(prefix + "/edit", $('#form-elevatorInstall-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
